import request from '@/config/axios'

export interface AppVO {
  id: number
  appName: string
  appUrl: string
  icon: string
  paramJson: string
}

// 查询首页跳转第三方应用列表
export const getAppPage = async (params) => {
  return await request.get({ url: `/university/app/page`, params })
}

// 查询首页跳转第三方应用详情
export const getApp = async (id: number) => {
  return await request.get({ url: `/university/app/get?id=` + id })
}

// 新增首页跳转第三方应用
export const createApp = async (data: AppVO) => {
  return await request.post({ url: `/university/app/create`, data })
}

// 修改首页跳转第三方应用
export const updateApp = async (data: AppVO) => {
  return await request.put({ url: `/university/app/update`, data })
}

// 删除首页跳转第三方应用
export const deleteApp = async (id: number) => {
  return await request.delete({ url: `/university/app/delete?id=` + id })
}

// 导出首页跳转第三方应用 Excel
export const exportApp = async (params) => {
  return await request.download({ url: `/university/app/export-excel`, params })
}
